{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Simple Bar Chart with Labels\n",
    "============================\n",
    "This example shows a basic horizontal bar chart with labels created with Altair.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "import altair as alt\n",
    "alt.data_transformers.enable('json')\n",
    "import pandas as pd\n",
    "\n",
    "data = pd.DataFrame({\n",
    "    'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],\n",
    "    'b': [28, 55, 43, 91, 81, 53, 19, 87, 52]\n",
    "})\n",
    "\n",
    "bars = alt.Chart(data).mark_bar().encode(\n",
    "    y='a',\n",
    "    x='b'\n",
    ")\n",
    "\n",
    "text = bars.mark_text(\n",
    "    align='left',\n",
    "    baseline='middle',\n",
    "    dx=3\n",
    ").encode(\n",
    "    text='b'\n",
    ")\n",
    "\n",
    "bars + text\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "env": {},
   "interrupt_mode": "signal",
   "language": "python",
   "metadata": {},
   "name": "python3"
  },
  "language": "python"
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
